﻿using System;
using System.Collections.Generic;
using System.Linq;


class CustomExceptions
{
    static void ReadNumber()
    {
        try
        {
            Console.Write("Please enter start number: ");
            int start = int.Parse(Console.ReadLine());
            Console.Write("Please enter end number: ");
            int end = int.Parse(Console.ReadLine());

            List<int> numbers = new List<int>();
            if (end - start < 10)
                {
                    throw new System.ArgumentOutOfRangeException("start number should be lower than end number with at lest 10");
                }

            for (int counter = 0; counter < 10; counter++)
            {
                Console.Write("Please enter number-{0} of 10: ", counter + 1);
                int number = int.Parse(Console.ReadLine());
                
                if (numbers.Count!=0 && number <= numbers.Last())
                {
                    throw new System.ArgumentOutOfRangeException("every number should be bigger than the previous one");
                }
                else if (number < start || number > end)
                {
                    throw new System.ArgumentOutOfRangeException("the numbers cant be bigger then the defined range");
                }

                numbers.Add(number);
            }
        }
        catch (ArgumentOutOfRangeException ore)
        {
            Console.WriteLine(ore.Message);
        }
        catch (OverflowException)
        {
            Console.WriteLine("invalid number for int");
        }
        catch (FormatException)
        {
            Console.WriteLine("wrong format, please enter numbers only");
        }
    }




    static void Main()
    {
        ReadNumber();
    }
}